/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 *
 * @author Ekaterina
 */
@Entity
@Table (name = "experience", catalog = "otdelkadrov", schema = "")

public class Experience implements Serializable {
    
     @Column(name = "mesto")
private String mesto;
     
      @Column(name = "profession")
private String profession;
      
       @Column(name = "stazh_date")
        @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date stazh_date;
       
        @Column(name = "stazh")
        @Temporal(javax.persistence.TemporalType.TIME)
private Date stazh;
          
           @Column(name = "nadbavka")
           @Temporal(javax.persistence.TemporalType.TIME)
private Date nadbavka;
           
           
              @Column(name = "date_yvol")
              @Temporal(javax.persistence.TemporalType.TIMESTAMP)
private Date date_yvol;
              
               @Column(name = "prichina")
private String prichina;
    
                 
     @Id
@GeneratedValue
@Column (name="id")
private Integer id = null;

  @ManyToOne
    @JoinColumn(name = "worker",referencedColumnName = "id")
    private Worker worker;

    public String getMesto() {
        return mesto;
    }

    public String getProfession() {
        return profession;
    }

    public Date getStazh_date() {
        return stazh_date;
    }

    public Date getStazh() {
        return stazh;
    }

      public Date getNadbavka() {
        return nadbavka;
    }

    public Date getDate_yvol() {
        return date_yvol;
    }

    public String getPrichina() {
        return prichina;
    }


    public Integer getId() {
        return id;
    }

    public Worker getWorker() {
        return worker;
    }

    public void setMesto(String mesto) {
        this.mesto = mesto;
    }

    public void setProfession(String profession) {
        this.profession = profession;
    }

    public void setStazh_date(Date stazh_date) {
        this.stazh_date = stazh_date;
    }

    public void setStazh(Date stazh) {
        this.stazh = stazh;
    }

    public void setNadbavka(Date nadbavka) {
        this.nadbavka = nadbavka;
    }

    public void setDate_yvol(Date date_yvol) {
        this.date_yvol = date_yvol;
    }

    public void setPrichina(String prichina) {
        this.prichina = prichina;
    }


    public void setId(Integer id) {
        this.id = id;
    }

    public void setWorker(Worker worker) {
        this.worker = worker;
    }


     
}
